<?php
// header('Content-Type:text/plain;charset=utf-8');
error_reporting(0);
$nickname=$_GET['nickname'];
$new_nickname=$_GET['new_nickname'];
$host='localhost';
$user='root';
$password='Xiangni365';
$database='login';
$con=mysqli_connect($host,$user,$password,$database);
if(!$con){
    die(mysqli_connect_error());
}
$encode=mysqli_query($con,"set names utf8");
$update=mysqli_query($con,"UPDATE login_check SET nick_name='$new_nickname' WHERE nick_name='$nickname'");
if(!$update){
    echo('0');
}else{
    echo($new_nickname);
}
?>